--physically parent entities to others.
local priority = 5

EntitySystem.updatesystem("binding", priority, function(dt) 
     
  --[[for e in pairs(EntitySystem.query("boundTo")) do
   --no joint present and bodys are ready. so make joint
    if not e.boundTo.joint then
      if e.physics.body and e.boundTo.entity.body then
        print(2)
        if e.jointType == "weld" then
          print(3)
          e.boundTo.joint = love.physics.newRevoluteJoint(e.boundTo.entity.body, e.physics.body,
                                                       e.boundTo.position.x, e.boundTo.position.y,
                                                       true)
          print(4)
        end
      end                                   
    end
  end]]
end)